-- DIVISION_CG_BONUS
-- 分割创世之门的奖励（用于表现）

return function(bonus)
    local bonusList = table.deepcopy(bonus);

    local ret = {};
    local count;
    for k, v in pairs(bonusList) do
        -- 遗迹碎片和金币分9次
        if (v[1] == 1 and v[2] == 10000) or (v[1] == 2 and v[2] == "money") then
            count = math.modf(v[3] / 9);

            if count > 0 then
                for i = 1, 9 do
                    table.insert(ret, {v[1], v[2], count});
                end
            else
                table.insert(ret, v);
            end
        -- 史莱姆の和黄金罐分10次
        elseif v[1] == 1 and (v[2] == 1512 or v[2] == 1511) then
            count = math.modf(v[3] / 5);
            if count > 0 then
                for i = 1, 5 do
                    table.insert(ret, {v[1], v[2], count});
                end
            else
                table.insert(ret, v);
            end
        else
            table.insert(ret, v);
        end
    end

    return ret;
end